<aside class="sidebar">
  <nav class="sidebar-nav">

  <ul id="acc">
  {% if page.lang contains 'en' %}{% assign sidebar = site.data.sidebar-en %}
  {% elsif page.lang contains 'zh' %}{% assign sidebar = site.data.sidebar-zh %}{% endif %}
  {% for item in sidebar.[page.section] %}
  {% assign slug_title = item.title | slugify %}
  {% if page.url contains item.url %}{% assign active = 'class="active"' %}
  {% else %}{% assign active = '' %}{% endif %}
    <li {{ active }}>
      <a style="font-weight:bold" {% if item.url %} href="{{ site.baseurl }}{{ item.url }}"{% endif %}>{{ item.title }}</a>
      {% if item.submenu  %}

          <ul>
            {% for entry in item.submenu %}
            {% if page.url contains entry.url %}{% assign active = 'class="active"' %}
            {% else %}{% assign active = '' %}{% endif %}
            <li {{ active }}><a href="{{ site.baseurl }}{{ entry.url }}">{% if entry.page contains '\' %}<img width='70px' src='https://raw.githubusercontent.com/keymetrics/branding/master/logos/pm2ioAPM/io-black.png'> {% endif %}{{ entry.page }}</a></li>
            {% endfor %}
          </ul>

      {% endif %}
    </li>
    {% endfor %}
  </ul>

</nav>
</aside>
